﻿<?xml version="1.0" encoding="utf-8" ?>
<GuidancePackage xmlns="http://schemas.microsoft.com/pag/gax-core"
    Name="SteriaMummert.SharePoint.SoftwareFactoryLite" 
    Caption="SharePoint 2007 SoftwareFactoryLite"
    Description="A SharePoint Software Factory (created by Steria Mummert Consulting)"
    BindingRecipe="CreateBindings"
    Guid="f3c54444-f090-46af-ba7c-950a1f7221d8" 
    SchemaVersion="1.0" >
  <Overview Url="HTML/Intro.htm"/>
  <HostData>
    <Icon File="spalm.ico" />
    <Menu Name="SPALMSolution" Text="SharePoint Software Factory" Priority="1">
      <CommandBar Name="Solution Folder" />
    </Menu>
    <Menu Name="SPALMProject" Text="SharePoint Software Factory" Priority="1">
      <CommandBar Name="Project"/>
    </Menu>
    <Menu Name="SPALMGeneral" Text="General" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>   
    <Menu Name="SPALMListAndDoc" Text="Lists and Documents" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>
    <Menu Name="SPALMSites" Text="Sites" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>
    <Menu Name="SPALMPublishing" Text="Publishing" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>
    <Menu Name="SPALMEventHandlers" Text="Event Handlers" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>
    <Menu Name="SPALMWorkflows" Text="Workflows" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>
    <Menu Name="SPALMControls" Text="Controls" Priority="1">
      <CommandBar Menu="SPALMProject"/>
    </Menu>
    <Menu Name="SPALMItem" Text="SharePoint Software Factory" Priority="1">
      <CommandBar Name="Item"/>
    </Menu>
    <Menu Name="SPALMFolder" Text="SharePoint Software Factory" Priority="1">
      <CommandBar Name="Solution Folder"/>
    </Menu>   
  </HostData>
  <Recipes>
    <xi:include href="Recipes\CreateBindings.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    
    <xi:include href="Recipes\ApplicationDiagram.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    
    <xi:include href="Recipes\DocumentsLists\SiteColumnFeature.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\DocumentsLists\ContentTypeFeature.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\DocumentsLists\SiteColumn.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\DocumentsLists\ContentType.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    
    <xi:include href="Recipes\General\EmptyFeature.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\General\WebPartFeature.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

    <xi:include href="Recipes\Workflows\SequentialWorkflowFeature.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

    <xi:include href="Recipes\Sites\FeatureStaplingFeature.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    
    <xi:include href="Recipes\WSP\WSPSolution.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

    <xi:include href="Recipes\STSADM\STSADMExtensionsProject.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\STSADM\STSADMCommand.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

    <xi:include href="Recipes\TestProject.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    
    <xi:include href="Recipes\MSBuild\MSBuildTaskProject.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\MSBuild\MSBuildTask.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="Recipes\MSBuild\MSBuildProcessorRecipe.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

    <xi:include href="Recipes\ShowRecipeIndex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

    <Recipe Name="CreateSharePointApplication">
      <Caption>Create a new SPALM SharePoint Application</Caption>
      <Arguments>
        <Argument Name="SolutionName" Required="false">
          <ValueProvider Stage="OnBeforeActions" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.CurrentSolutionFilenameProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
        </Argument>
        <Argument Name="ApplicationName" Required="true">
          <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Application" />
        </Argument>
        <Argument Name="ApplicationNamespace" Required="true">
          <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ApplicationNamespace" />
        </Argument>
        <Argument Name="WSPSolutionName" Required="true">
          <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="WSPName" />
        </Argument>

        <Argument Name="WSPSolutionID" Required="true">
          <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.GuidValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
        </Argument>
        <Argument Name="WSPDeploymentServerType" Required="true">
          <Converter Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Converters.SolutionDeploymentServerTypeConverter, SteriaMummert.SharePoint.SoftwareFactoryLite" />
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="WebFrontEnd" />
        </Argument>
        <Argument Name="WSPDeploymentTarget" Required="true">
          <Converter Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Converters.SolutionDeploymentTargetConverter, SteriaMummert.SharePoint.SoftwareFactoryLite" />
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="GAC" />
        </Argument>
        <Argument Name="WSPResetServer" Type="System.Boolean" Required="true">
        </Argument>

        <Argument Name="WSPSolutionSignAssembly" Type="System.Boolean" />
        <Argument Name="WSPSolutionKeyFileName" Required="true" Type="System.String" >
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="$(ApplicationNamespace).$(ApplicationName).snk">
            <MonitorArgument Name="ApplicationNamespace" />
            <MonitorArgument Name="ApplicationName" />
          </ValueProvider>
        </Argument>
        <Argument Name="DevelopmentSharePoint" Required="false">
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="DEV" />
        </Argument>
        <Argument Name="TestSharePoint" Required="false">
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="TEST" />
        </Argument>
        <Argument Name="ProductionSharePoint" Required="false">
          <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="PROD" />
        </Argument>
      </Arguments>
      <GatheringServiceData>
        <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
          <Pages>
            <Page>
              <Title>SharePoint Application Information</Title>
              <LinkTitle>Application</LinkTitle>
              <Help>
                Enter the Application name and namespace.
              </Help>
              <Fields>
                <Field ValueName="ApplicationNamespace" Label="Application Namespace" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
                <Field ValueName="ApplicationName" Label="Application Name" InvalidValueMessage="Must be a valid .NET identifier (e.g. it shouldn't contain spaces or special characters)." />
              </Fields>
            </Page>
            <Page>
              <Title>WSP Solution</Title>
              <Help>
                Enter the information for the initial WSP Solution
              </Help>
              <Fields>
                <Field ValueName="WSPSolutionName" Label="WSP Solution Name" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
                <Field ValueName="WSPSolutionID" Label="WSP Solution ID" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
                <Field ValueName="WSPDeploymentServerType" Label="Deployment Server Type" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
                <Field ValueName="WSPDeploymentTarget" Label="Deployment Target" />
                <Field ValueName="WSPResetServer" Label="Reset Webserver" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
              </Fields>
            </Page>
            <Page>
              <Title>Strong Naming</Title>
              <Help>
                Enter the information for the initial WSP Solution
              </Help>
              <Fields>
                <Field ValueName="WSPSolutionSignAssembly" Label="Sign Assembly"  />
                <Field ValueName="WSPSolutionKeyFileName" Label="Key file (.snk)" />
              </Fields>
            </Page>

            <Page>
              <Title>Build Targets</Title>
              <LinkTitle>BuildTargets</LinkTitle>
              <Help>
                Enter the name of the SharePoint Servers
              </Help>
              <Fields>
                <Field ValueName="DevelopmentSharePoint" Label="Development Server Name" InvalidValueMessage="Must be a valid .NET identifier (e.g. it shouldn't contain spaces or special characters)." />
                <Field ValueName="TestSharePoint" Label="Test Server Name" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
                <Field ValueName="ProductionSharePoint" Label="Production Server Name" InvalidValueMessage="Must be a valid .NET namespace identifier (e.g. it shouldn't contain spaces or special characters)." />
              </Fields>
            </Page>
          </Pages>
        </Wizard>
      </GatheringServiceData>
      <Actions>

        <Action Name="SaveConfigValue1" KeyName="ApplicationName" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.SaveApplicationConfiguration, SteriaMummert.SharePoint.SoftwareFactoryLite" >
          <Input Name="KeyValue" RecipeArgument="ApplicationName" />
        </Action>

        <Action Name="SaveConfigValue2" KeyName="ApplicationNamespace" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.SaveApplicationConfiguration, SteriaMummert.SharePoint.SoftwareFactoryLite" >
          <Input Name="KeyValue" RecipeArgument="ApplicationNamespace" />
        </Action>

        <Action Name="SaveConfigValue3" KeyName="WSPSolutionKeyFileName" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.SaveApplicationConfiguration, SteriaMummert.SharePoint.SoftwareFactoryLite" >
          <Input Name="KeyValue" RecipeArgument="WSPSolutionKeyFileName" />
        </Action>

        <Action Name="SaveConfigValue4" KeyName="WSPSolutionSignAssembly" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.SaveApplicationConfiguration, SteriaMummert.SharePoint.SoftwareFactoryLite" >
          <Input Name="KeyValue" RecipeArgument="WSPSolutionSignAssembly" />
        </Action>

        <Action Name="AddSharePointConfigToSolution" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToSolution, SteriaMummert.SharePoint.SoftwareFactoryLite"
          SourceFile="Text/SharepointConfiguration.xml"
          TargetFilename="SharepointConfiguration.xml" >
        </Action>

        <Action Name="AddDiagramToSolution" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToSolution, SteriaMummert.SharePoint.SoftwareFactoryLite"
          SourceFile="Text/ApplicationDiagram.spl"
          TargetFilename="ApplicationDiagram.spl" >
        </Action>

        <Action Name="AddKeyFile" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddKeyFileToSolution, SteriaMummert.SharePoint.SoftwareFactoryLite" >
          <Input Name="KeyFileName" RecipeArgument="WSPSolutionKeyFileName" />
          <Input Name="EnableStrongNaming" RecipeArgument="WSPSolutionSignAssembly" />
        </Action>

        <Action Name="CreateApplicationDiagram" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.CreateApplicationDiagram, SteriaMummert.SharePoint.SoftwareFactoryLite" ></Action>

        <Action Name="GenerateTFSBuild" Template="Text\TFSBuild.proj.t4" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.CustomTextTemplateAction, SteriaMummert.SharePoint.SoftwareFactoryLite" InputValue="Configured Static Value"  >
          <Output Name="Content" />
        </Action>
        <Action Name="AddTFSBuild"
                Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToSolution, SteriaMummert.SharePoint.SoftwareFactoryLite"
                Open="false"
                TargetFilename="TFSBuild.proj"
                  >
          <Input Name="Content" ActionOutput="GenerateTFSBuild.Content" />
        </Action>

        <Action Name="ShowLocalWebsite" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.ShowLocalWebsite, SteriaMummert.SharePoint.SoftwareFactoryLite"
           Url="HTML\Application\Overview.htm" />

      </Actions>
    </Recipe>
  </Recipes>
</GuidancePackage>